Capacity Property

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets or sets the capacity of the Deque. The Capacity is the number of items that this Deque can hold without expanding its internal buffer. Since Deque will automatically expand its buffer when necessary, in almost all cases it is unnecessary to worry about the capacity. However, if it is known that a Deque will contain exactly 1000 items eventually, it can slightly improve efficiency to set the capacity to 1000 up front, so that the Deque does not have to expand automatically.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public int Capacity{ get; set;}
Visual Basic (Declaration)
Public Property Capacity As Integer
Visual C++
public:
property int Capacity {
	int get ();
	void set (int value);
}

Field Value

The number of items that this Deque can hold without expanding its internal buffer.

Exceptions

ExceptionCondition
System..::ArgumentOutOfRangeExceptionThe capacity is being set to less than Count, or to too large a value.

See Also